<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>表单</title>
    <link rel="stylesheet" href="../layui/css/layui.css">
</head>
<body>
    <script src="../layui/layui.js"></script>

    <!-- 时间选择框 本质上是一个文本输入框 -->
    <div class="layui-input-inline">
        <input type="text" class="layui-input" id="ID-laydate-demo" placeholder="yyyy-MM-dd">
    </div>

    <script>
        // 再通过laydate组件通过id绑定
        layui.use(function(){
            var laydate = layui.laydate;

            laydate.render({
                elem: "#ID-laydate-demo"
            });
        });
    </script>
</body>
</html>